﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/MasterPage.master" 
AutoEventWireup="true" CodeFile="ShoppingCartHistories.aspx.cs"
 Inherits="User_ShoppingCartHistories" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div align="center" style="padding: 20px; margin-bottom: 20px">
    <asp:Label ID="Label1" runat="server" Text="Lịch sử mua hàng" Font-Bold="True" 
        ForeColor="#FF3300" Font-Names="Arial" Font-Size="14pt"></asp:Label>
  </div>
  <div align="center" style="padding-bottom: 20px" >
     <asp:Label ID="Label3" runat="server" 
          Text="Chọn trạng thái của đơn đặt hàng cần xem" Font-Names="Arial" 
          Font-Size="14pt"></asp:Label>  &nbsp;
      <asp:DropDownList
          ID="dropKHChon" runat="server" Width="130px" AutoPostBack="True" 
          onselectedindexchanged="dropKHChon_SelectedIndexChanged" >
           <asp:ListItem Value="1">Chưa duyệt</asp:ListItem>
           <asp:ListItem Value="2">Đã duyệt</asp:ListItem>
      </asp:DropDownList>
  </div>
  <div align="center">  
             <asp:Label ID="lbThongBao" runat="server"  Font-Bold="True" 
                ForeColor="#FF3300" Font-Size="14pt"></asp:Label></div> 

    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <div align="center" style="width: 682px; margin-left:2px; margin-right:2px; margin-top:10px">
    <asp:GridView ID="gvShowGH" runat="server" AutoGenerateColumns="False" 
        Width="650px" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" 
        BorderWidth="1px" CellPadding="3" AllowPaging="True" 
        onpageindexchanging="gvShowGH_PageIndexChanging" CellSpacing="2" 
                    onrowdatabound="gvShowGH_RowDataBound" 
                    onselectedindexchanged="gvShowGH_SelectedIndexChanged">
        <Columns>
            <asp:BoundField DataField="MaHD" HeaderText="Số HD" ><ControlStyle Font-Overline="False" Font-Strikeout="False" /><ControlStyle 
                Font-Overline="False" Font-Strikeout="False" /><HeaderStyle 
                Font-Size="11pt" Width="30px" Height="20px" /><ItemStyle Font-Size="10pt" 
                Height="30px" /></asp:BoundField>
            <asp:BoundField DataField="NgayLap" HeaderText="Ngày đặt" 
                DataFormatString="{0:dd/MM/yyyy}" ><ControlStyle Width="126px" /><ControlStyle 
                Width="126px" /><HeaderStyle Font-Size="11pt" Width="100px" /><ItemStyle Font-Size="10pt" /></asp:BoundField>
            <asp:BoundField DataField="NgayGiaoHang" HeaderText="Ngày giao" 
                DataFormatString="{0:dd/MM/yyyy}" ><ControlStyle Width="126px" /><ControlStyle 
                Width="126px" /><HeaderStyle Font-Size="11pt" Width="100px" /><ItemStyle Font-Size="10pt" /></asp:BoundField>
            <asp:TemplateField HeaderText="Trạng Thái"><ItemTemplate><asp:Label ID="Label2"  Text='<%# Bind("TrangThai") %>' runat="server"></asp:Label></ItemTemplate><ControlStyle Width="150px" /><ControlStyle 
                Width="150px" /><HeaderStyle Font-Size="11pt" Width="120px" /><ItemStyle Font-Size="10pt" Width="40px" /></asp:TemplateField>
            <asp:BoundField DataField="TongTien" HeaderText="Tồng tiền(vnđ)" 
                ><ControlStyle Width="150px" /><ControlStyle Width="150px" /><HeaderStyle Font-Size="11pt" Width="100px" /><ItemStyle Font-Size="10pt" /></asp:BoundField>
            <%--<asp:HyperLinkField HeaderText="Chi Tiết" Text="chi tiết">
            <ControlStyle Width="50px" />
            <HeaderStyle Width="50px" />
            </asp:HyperLinkField>--%>
            <asp:CommandField CausesValidation="False" SelectText="chi tiết" 
                                ShowSelectButton="True" 
                                ItemStyle-Width="20" ItemStyle-Height="7" 
                HeaderText="Chi Tiết"><HeaderStyle Width="50px" Font-Size="11pt" /><ItemStyle 
                Height="10px" Font-Size="10pt" /></asp:CommandField>
        </Columns>
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FFF1D4" />
        <SortedAscendingHeaderStyle BackColor="#B95C30" />
        <SortedDescendingCellStyle BackColor="#F1E5CE" />
        <SortedDescendingHeaderStyle BackColor="#93451F" />
        <SortedAscendingCellStyle BackColor="#FFF1D4" />
        <SortedAscendingHeaderStyle BackColor="#B95C30" />
        <SortedDescendingCellStyle BackColor="#F1E5CE" />
        <SortedDescendingHeaderStyle BackColor="#93451F" />
    </asp:GridView>
</div>

        </asp:View>
        
     <asp:View ID="View2" runat="server">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
         <div style="padding-left: 47px">
            <asp:Label ID="Label6" runat="server" Text="Số HĐ:" ForeColor="Black" 
                Font-Size="13pt"></asp:Label>&nbsp;
       <asp:Label ID="lbSoHoaDon" runat="server" Text="" ForeColor="Red" 
                Font-Size="13pt"></asp:Label>
                        </div>
        <div align="center" style="margin-bottom: 20px">
            <asp:GridView ID="gvChiTietDDHang" runat="server" AutoGenerateColumns="False" 
                BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
                CellPadding="3" CellSpacing="2" Width="600px" 
                onrowdeleting="gvChiTietDDHang_RowDeleting" 
                onrowdatabound="gvChiTietDDHang_RowDataBound">
                <Columns>
                    <asp:BoundField HeaderText="Tên Sản Phẩm" DataField="tensp" >
                    <HeaderStyle 
                        Font-Size="11pt" Width="150px" /><ItemStyle Font-Size="10pt" 
                        Width="150px" /></asp:BoundField>
                    <asp:BoundField HeaderText="Số Lượng" DataField="SoLuong" ><HeaderStyle 
                        Font-Size="11pt" Width="100px" /><ItemStyle Font-Size="10pt" Width="30px" /></asp:BoundField>
                    <asp:BoundField HeaderText="Đơn Giá" DataField="Gia" ><HeaderStyle 
                        Font-Size="11pt" Width="100px" /><ItemStyle Font-Size="10pt" Width="30px" /></asp:BoundField>
                    <asp:TemplateField HeaderText="Thành Tiền">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Font-Size="10pt" 
                                Text='<%# Bind("ThanhTien") %>'></asp:Label>
                            <asp:HiddenField ID="hdMaSP" runat="server" Value='<%#  Eval("masp") %>' />
                        </ItemTemplate>
                        <HeaderStyle Width="150pt" />
                        <ItemStyle Width="30px" />
                    </asp:TemplateField>
                    <asp:CommandField CausesValidation="False" DeleteText="" 
                                ShowDeleteButton="True" ButtonType="Image" 
                                DeleteImageUrl="~/Admin/images/Admin/delete-icon.png" 
                                ItemStyle-Width="15" HeaderText="Xoá" ><HeaderStyle Width="50px" /><ItemStyle Width="15px" /></asp:CommandField>
                </Columns>
                <EditRowStyle Height="30px" />
                <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" 
                    Height="40px" />
                <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FFF1D4" />
                <SortedAscendingHeaderStyle BackColor="#B95C30" />
                <SortedDescendingCellStyle BackColor="#F1E5CE" />
                <SortedDescendingHeaderStyle BackColor="#93451F" />
                <SortedAscendingCellStyle BackColor="#FFF1D4" />
                <SortedAscendingHeaderStyle BackColor="#B95C30" />
                <SortedDescendingCellStyle BackColor="#F1E5CE" />
                <SortedDescendingHeaderStyle BackColor="#93451F" />
            </asp:GridView>
        </div>
        <div style="padding-left: 400px; font-size: 13px; font-family: Arial, Helvetica, sans-serif;">
            <asp:Label ID="Label5" runat="server" Text="Giảm Giá:" ForeColor="Black" 
                Font-Size="13pt"></asp:Label>&nbsp;&nbsp;
         <asp:Label ID="lbGiamGia"
                runat="server" Text="Label" ForeColor="Red" Font-Size="13pt"></asp:Label></div> 
           
        <div style="padding-left: 400px; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">
        <asp:Label ID="Label7" runat="server" Text="Tồng Tiền:" ForeColor="Black" 
                Font-Size="13pt"></asp:Label>&nbsp;
       <asp:Label ID="lbTongTien" runat="server" Text="Label" ForeColor="Red" 
                Font-Size="13pt"></asp:Label></div>
        <div style="padding-left: 400px; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">
            <asp:Button ID="btnQuayLai" runat="server" Text="Quay lại" Font-Bold="True" 
                ForeColor="Black" onclick="btnQuayLai_Click" Width="80px" 
                />
            <asp:HiddenField ID="hfStt" runat="server" Value="0"/>
            <asp:HiddenField ID="hfSoHD" runat="server" />
        </div>
       </ContentTemplate>
        </asp:UpdatePanel>
        </asp:View>
            
        
    </asp:MultiView>

</asp:Content>

